package com.lagou.homework3;

/**
 * 火车买票案例 (两种实现方式) : 共100张票,三个线程一起卖票,不允许出现出现负票和多卖的现象(Runnable方式)
 */
public class TicketTest2 {

    public static void main(String[] args) {

        Ticket1 tk1 = new Ticket1();
        Thread t1 = new Thread(tk1);
        Thread t2 = new Thread(tk1);
        Thread t3 = new Thread(tk1);
        t1.start();
        t2.start();
        t3.start();
    }
}
